import React from 'react';
import {
  AppRegistry,
} from 'react-native';
import {DrawerNavigator,TabNavigator,StackNavigator} from 'react-navigation'
import HomeScreen from './HomeScreen'
import DetailsScreen from './DetailsScreen'


const RootStack = StackNavigator(
  {//定义路由
    Home: {screen: HomeScreen},
    Details:{screen: DetailsScreen},
  },
  {//定义配置
    initialRouteName: 'Home',
    navigationOptions:{           //导航栏通用设置
      headerStyle:{
        backgroundColor:'#7276ff'
      }
    }
  }
);

export default class App extends React.Component {
  render() {                            //将Navigation作为根路径导出
    return <RootStack />;
  }
}
